package org.springblade.common.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.info.BuildProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@Slf4j
public class BeanPostConfig  {

	@Autowired
	private BuildProperties buildProperties;


	@PostConstruct
	public void printVersion() {
		log.info("=================project=================");
		log.info("Version: " + buildProperties.getVersion());
		log.info("Build Time: " + buildProperties.getTime());
		log.info("=================project=================");

	}


}
